package com.homework.question2;

/**
 * @ClassName Circle
 * @Description TODO
 * @Author hp
 * @Date 2021/6/16 16:55
 * @Version 1.0
 **/
public class Circle implements Graphic {
    private double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    @Override
    public double area() {
        return radius*radius*Math.PI;
    }
}
